<?php $this->load->view('global_header'); ?>
<link rel="stylesheet" type="text/css" href="/assets/css/news.css"/>
<div>
    <a href="<?php echo base_url(); ?>admin.php?c=news&m=create">添加新闻</a>
</div>
<div class="newss">
    <?php foreach ($news as $n): ?>
        <div class="news">
        <h5><?php echo $n->title; ?></h5>
        <p><?php echo $n->content; ?></p>
        <div class="footer">
            <div class="time left"><?php echo $n->created_at; ?></div>
        <div class="actions">
            <a href="<?php echo base_url(); ?>admin.php?c=news&m=edit&id=<?php echo $n->id; ?>">修改</a>
            <a href="<?php echo base_url(); ?>admin.php?c=news&m=delete&id=<?php echo $n->id; ?>">删除</a>
        </div>
        </div>
    </div>
    <?php endforeach; ?>
</div>
<div class="page_links">
    <?php echo $page_links; ?>
</div>
<?php $this->load->view('global_footer'); ?>
